package org.ww.product.feign.fallback;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.ww.common.exception.GmallExceptionEnum;
import org.ww.common.utils.R;
import org.ww.product.feign.SeckillFeignService;

/**
 * @program: gmall
 * @description:
 * @author: ww
 * @create: 2024-11-12 10:22
 **/
@Slf4j
@Component
public class SeckillFeignServiceImplFallback implements SeckillFeignService {
    @Override
    public R getSkuSeckillInfo(Long skuId) {
        log.info("调用秒杀远程服务失败，触发熔断.......");
        return R.error(GmallExceptionEnum.TOO_MANY_REQUEST.getCode(),GmallExceptionEnum.TOO_MANY_REQUEST.getMsg());
    }
}
